import java.util.*;

/**
 * @program: 12.2
 * @description:
 * @author: 李鑫月
 * @create: 2021-12-02 20:15
 **/
public class Test {
    public static void main1(String[] args) {
        Map<String,String>map=new HashMap<>();
        Map<String,String>map1=new TreeMap<>();
        map.put("李鑫月","boss");
        map.put("李心如","worker");
        System.out.println(map);
        System.out.println(map.get("lixinyue"));
        Set<Map.Entry<String,String>> entrySet= map.entrySet();
        for (Map.Entry<String,String> entry:
        entrySet) {
            System.out.println(entry.getKey());
        }
    }
    public static void main(String[] args) {
        Collection<String> collection=new ArrayList<>();
        collection.add("aaa");
        //尖括号当中放的类型一定要是类类型，不能是简单的基本类型
        collection.add("ccc");
        System.out.println(collection);
        Object[] object=collection.toArray();
        System.out.println(Arrays.toString(object));
        collection.clear();
    }
}
